import React from 'react';

const Son = function(props) {
    const {select} = props
    let b ='我是子组件的值'
   const mySelect = (b) => {
       select(b)
   }    
   
    return(
        <div onClick={() => {
            mySelect(b)
        }}>我是子组件</div>
    )
    
}

const Singer = function() {
//  const [count,setCount] = useState(0) 
  const onSelect = function(a) {
      console.log('我是父亲');
     console.log(a);
    //  setCount(count+1)
  }

    return (
       <div>
           <Son  select={(a) => {
               onSelect(a)
           }}></Son>  
       </div>  
    ) 
}
export default Singer